<template>
  <div>
    <div>
      <h4>测试RADIO_开关</h4>
      <el-row :gutter="20">
        <el-col>
          <span>是否XXX</span>
        </el-col>
        <el-col :span="8">
          <div class="grid-content">
            <el-radio-group v-model="pgForm.test_radio_switch_radio1">
              <el-radio :label="3">有</el-radio>
              <el-radio :label="6">无</el-radio>
              <el-radio :label="9">年龄大</el-radio>
            </el-radio-group>
          </div>
        </el-col>
        <el-col :span="6">
          <el-select v-model="pgForm.test_radio_switch_value1" placeholder="请选择">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value">
            </el-option>
          </el-select>
        </el-col>
        <el-col :span="6">
          <div>
            <span>屈 </span>
            <el-input v-model="pgForm.test_radio_switch_input1" placeholder="0~150°" style="width: 60%;"></el-input>
            <span> °</span>
          </div>
        </el-col>
      </el-row>

      <el-row :gutter="20">
        <el-col>
          <span>是否XXX</span>
        </el-col>
        <el-col>
          <div class="grid-content">
            <el-radio-group v-model="pgForm.test_radio_switch_radio2">
              <el-radio :label="3">有</el-radio>
              <el-radio :label="6">无</el-radio>
            </el-radio-group>
          </div>
        </el-col>
        <el-col :span="5">
          <div>
            <el-select v-model="pgForm.test_radio_switch_value2" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col :span="6">
          <div>
            <span>屈 </span>
            <el-input v-model="pgForm.test_radio_switch_input2" placeholder="0~150°" style="width: 70%;"></el-input>
            <span> °</span>
          </div>
        </el-col>
        <el-col :span="6">
          <div>
            <span>选项 </span>
            <el-select v-model="pgForm.test_radio_switch_value3" placeholder="请选择" style="width: 50%;">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </div>
        </el-col>
        <el-col :span="6">
          <div>
            <span>选项 </span>
            <el-select v-model="pgForm.test_radio_switch_value4" placeholder="请选择" style="width: 50%;">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  name: "test_radio_switch",
  title: "测试RADIO_开关",
  created() {
    if(this.istrans){
      this.pgForm=this.fromdata
    }
  },
  props: {
    fromdata:{},
    istrans:false,
  },
  data () {
    return {
      pgForm: {
        test_radio_switch_radio1: null,
        test_radio_switch_radio2: null,
        test_radio_switch_input1: '',
        test_radio_switch_input2: '',

        test_radio_switch_value1: '',
        test_radio_switch_value2: '',
        test_radio_switch_value3: '',
        test_radio_switch_value4: '',
      },
      options: [{
        value: '0',
        label: '0'
      }, {
        value: 'Ⅰ',
        label: 'Ⅰ'
      }, {
        value: 'Ⅱ',
        label: 'Ⅱ'
      }, {
        value: 'Ⅲ',
        label: 'Ⅲ'
      }, {
        value: 'Ⅳ',
        label: 'Ⅳ'
      }, {
        value: 'Ⅴ',
        label: 'Ⅴ'
      }],
    };
  }
}
</script>

<style scoped>
.el-row{
  margin: 10px 0;
  padding: 20px 20px;
  background-color: #f9f9f9;

}
.el-col {
  margin:10px 0;
}
.el-radio-group{
  padding: 10px 20px;
}
.el-radio{
  display: block;
  margin-bottom: 15px;
}
</style>
